/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.andersen.database.entity;

import java.util.List;

/**
 *
 * @author Corvus 11
 */
public class UserEntity {
        
        private long id;
        
	private String login;
	
	private List<String> roles;
	
	private boolean active;
	
	private String password;
        
        private long employeeId;
        
        private EmployeeEntity employee;

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }
        
	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

        public List<String> getRoles() {
            return roles;
        }

        public void setRoles(List<String> roles) {
            this.roles = roles;
        }
        
	public Boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}   

        public long getEmployeeId() {
            return employeeId;
        }

        public void setEmployeeId(long employeeId) {
            this.employeeId = employeeId;
        }

        public EmployeeEntity getEmployee() {
            return employee;
        }

        public void setEmployee(EmployeeEntity employee) {
            this.employee = employee;
        }

    @Override
    public String toString() {
        String _roles = "[";
        for(String r:roles)
            _roles += r + ", ";
        _roles+="]";
        return "UserEntity{" + "id=" + id + 
                ", login=" + login + 
                ", roles=" + _roles + 
                ", active=" + active + 
                ", password=" + password + 
                ", employeeId=" + employeeId + 
                ", employee=" + employee + '}';
    }
        
        
}
